/*
 * Copyright © 2016-2017 Cask Data, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
.cask-wizard {
  height: 100%;
  .wizard-body {
    display: flex;
    height: 100%;
    border: 0;

    .wizard-steps-header {
      width: 150px;
      background-color: #efefef;
      height: 100%;
      overflow: auto;
    }
    .wizard-steps-content {
      width: calc(100% - 150px);
      background-color: #ffffff;
      height: 100%;

      .form-horizontal {
        // wizard-navigation height = 32px. This is to ensure that the previous and next buttons remain in the same position to start with while switching the tabs.
        height: calc(100% - 32px);
        width: 100%;
        overflow-y: auto;
        overflow-x: hidden;
      }
      .wizard-navigation {
        display: flex;
        align-items: center;

        .step-helper-text {
          color: red;
        }

        .navigation-btn {
          margin-left: auto;
        }

        .btn {
          padding: 6px 20px;
          margin: 0 5px;

          .icon-svg {
            margin: 0 5px;
          }
        }
      }
    }
  }
  .wizard-footer {
    width: 100%;

    .card-action-feedback {
      &.DANGER,
      &.SUCCESS,
      &.LOADING {
        height: 100%;
      }
      &.LOADING {
        border-top-color: gray;
      }

      .stack-trace {
        // should be at least tall enough to show the resizable icon
        min-height: 45px;
        // 75vh (full height of modal) - 40px (modal header) - 360px (max modal body height) - 35px (error header)
        max-height: calc(75vh - 40px - 360px - 35px);
      }
    }
    &.success {
      width: 100%;
      position: relative;
      // 40px: height of modal header
      top: calc(-100% - 40px);
      right: 0;
      height: calc(100% + 40px);
      background: rgba(0, 0, 0, 0.8);
      color: white;

      .close-section {
        cursor: pointer;
        height: 40px;

        .icon-close {
          margin: 15px 20px;
        }
      }

      .result-container {
        position: absolute;
        top: 35%;
        left: 10%;
        font-size: 18px;
        max-width: 80%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;

        .success-subtitle {
          display: block;
          white-space: initial;
        }

        .clearfix {
          margin-top: 25px;

          .call-to-action {
            font-size: 18px;
            max-width: 60%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;

            &.disabled {
              pointer-events: auto;
            }
          }

          .secondary-call-to-action {
            color: white;
            margin-left: 50px;
            font-size: 14px;
          }

          .icon-spinner {
            margin-left: 5px;
          }
        }

        ul {
          list-style: none;

          > li {
            margin: 10px;
            font-size: 18px;
            color: white;
          }
        }
      }
    }
  }
}
